// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------

thread 'CAMT'


const 
to_x     = 0@
to_y     = 1@
to_z     = 2@
mult     = 3@
item_off = 4@
count    = 5@
id       = 6@
addres   = 7@
handler  = 8@
item_    = 9@
TO       = 10@
wap      = 11@
pid      = 12@
offset   = 13@
end

for id = 105 to 106 step 1
     Model.Load(id)
    038B: load_requested_models
end
for id = 102 to 103 step 1
     Model.Load(id)
    038B: load_requested_models
end
for id = 346 to 361 step 1
    if id == 354
    then id = 372
        Model.Load(id)
        038B: load_requested_models
    end
end                            
:start
repeat
wait 0 
until if Player.Defined(0)


//0@ = 2500.0 //cords x                
//1@ = -1659.0 //cords y               
//2@ = 12.3437 //cords z
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 20.0 -1.0    
0087: 14@ = 0@               
TO = 0
WHILE TRUE 
    WAIT 0
    for count = 1 to 100 step 1
        0085: offset = count
        offset *= 4                                                                   
        IF to <= 50
        THEN 0209: id = random_int_in_ranges 105 107
            pid = 7                        
        ELSE 0209: id = random_int_in_ranges 102 104
            pid = 8 
        END                                                                       
        handler = Actor.Create(pid, id, to_x, to_y, to_z)                                          
        0446: set_actor handler dismemberment_possible 0                                             
        0588: disable_actor handler validate_position 1
        actor.Health(handler) = 1000                                            
        07DD: set_actor handler attack_rate 100
        0209: wap = random_int_in_ranges 22 38 
        Actor.GiveWeaponAndAmmo(handler, wap, 8000)                                                    
        0AC6: addres = label @memory offset                                                          
        005A: addres += offset                                                                           
        0A8C: write_memory addres size 4 value handler virtual_protect 0                             
        IF mult >= 10                                                                                
        THEN                                                                                         
            0087: to_x = 14@                                                                     
            to_y -= 1.5                                                                              
            mult = 1                                                                                 
        ELSE                                                                                         
            mult += 1                                                                                
            to_x -= 1.2
            TO += 1                                                                              
        END
        if TO == 50
        then //to_x += 25.0      
        end                                                                                          
    end                                                                                              
    break                                                  
end



while true
wait 0
0AB4: 15@ < 509
IF 15@ == TRUE
THEN BREAK
END
end

for count = 0 to 100 step 1
    0085: offset = count
    offset *= 4
    0AC6: addres = label @memory offset    
    005A: addres += offset     
    0A8D: handler = read_memory addres size 4 virtual_protect 0
    IF handler > 0
    JF CONTINUE                    
    IF 056D:   actor handler defined 
    JF CONTINUE
    ACTOR.RemoveReferences(handler)
    ACTOR.DestroyInstantly(handler)
END
END_THREAD

   
:memory //(buf 81 * 4 byte 81 handlers)
hex
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
end
   
   
   
   
   
   